<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
	<title>狗东商城</title>
    <link rel="stylesheet" href="../static/detail/css/normalize.css" />
    <link rel="stylesheet" href="../static/detail/css/base.css" />
    <link rel="stylesheet" href="../static/detail/css/list.css" />
    <script src="../static/detail/js/jquery.min.js"></script>
    <script src="../static/detail/js/base.js"></script>
    <script src="../static/detail/js/list.js"></script>
    <link rel="stylesheet" href="../static/detail/css/normalize.css" />
    <link rel="stylesheet" href="../static/detail/css/base.css" />
    <link rel="stylesheet" href="../static/detail/css/index.css" />
    <link rel="stylesheet" href="../static/index/css/footer.css" />
    <script src="../static/detail/js/jquery.min.js"></script>
    <script src="../static/detail/js/base.js"></script>
    <script src="../static/detail/jsatail/js/index.js"></script>
    <link rel="stylesheet" href="../static/index/css/product.css" />
    <style type="text/css">
        @import url(../static/index/css/footer.css);
        @import url(../static/detail/css/normalize.css);
        @import url(../static/detail/css/base.css);
        @import url(../static/detail/css/index.css);
        @import url(../static/index/css/footer.css);
        /*.father {*/
        /*    display: inline-block;  !* 转化为行内块元素 *!*/
        /*    width: 130px;*/
        /*    height: 10px;*/
        /*    border: 1px solid #b1191a;*/
        /*    vertical-align: middle;   !* 居中对齐 *!*/
        /*    margin: 0 5px;*/
        /*    border-radius: 5px;*/
        /*}*/

        /*#Sun {*/
        /*    width: 100%;*/
        /*    height: 100%;*/
        /*    background: red;*/
        /*    border-radius: 10px;*/
        /*}*/
    </style>
</head>
<body>
<div class="shortcut">
    <div class="w">
        <!--        首页加位置-->
        <ul class="fl">
            <li id="ttbar-home"><i class="iconfont">&#xe608;</i><a href="/index" target="_blank">狗东首页</a></li>
            <li class="dorpdown" id="ttbar-mycity"></li>
        </ul>
    </div>
    <ul class="fr nav">
        <#if user?exists>
        <li>
            <a href="/userInfo" style="color: #c81623">${user}</a>
            &nbsp;&nbsp;&nbsp;
            <a href="/login" >退出登录</a>
            ${warning}
        </li>
        <li class="space"></li>
        <li>
            <a href="/order/all">我的订单</a>
        </li>
        <li class="space"></li>
        <li>
            <a href="/userInfo">我的狗东</a>
        </li>
        <#else>
        <li>
            <a href="/login">你好，请登录</a>
            <a href="/register" class="f10">免费注册</a>
        </li>
    </#if>
    <li class="space"></li>
    </ul>
</div>
</div>

<div class="m">
    <div class="w middle">
        <div class="logo">
            <h1>
                <a href="index" title="狗东">狗东</a>
            </h1>
        </div>
        <div class="form">
            <form action="/find/name" method="post">
                <input id="text" type="text" name="name" placeholder="搜索">
                <button><input type="submit" value="搜索" style="width: 50px"></button>
            </form>
        </div>
        <div class="shopCar">
            <i></i><a href="/cart" class="f10">我的购物车</a>
        </div>
        <div class="hotwords">
            <a href="#">${random1.name}</a>
            <a href="#">${random2.name}</a>
            <a href="#">${random3.name}</a>
            <a href="#">${random4.name}</a>
            <a href="#">${random5.name}</a>
            <a href="#">${random6.name}</a>
            <a href="#">${random7.name}</a>
            <a href="#">${random8.name}</a>
        </div>
        <div class="navitems">
            <ul>
                <li><a href="">秒杀</a></li>
                <li><a href="/find/kind?kind=服装">服装</a></li>
                <li><a href="/find/kind?kind=水果">水果</a></li>
                <li><a href="/find/kind?kind=书籍">书籍</a></li>
                <li><a href="/find/kind?kind=医疗用品">医疗用品</a></li>
                <li><a href="/find/kind?kind=数码产品">数码产品</a></li>
                <li><a href="/find/kind?kind=食品">食品</a></li>
                <li><a href="/find/kind?kind=电器">电器</a></li>
                <li><a href="/find/kind?kind=日常用具">日常用具</a></li>
                <li><a href="/find/kind?kind=其他">其他</a></li>
                <li class="space"></li>
            </ul>
        </div>
    </div>
</div>

    <div class="sk_hd">
        <img src="../static/detail/images/seckill.jpg" alt="">
    </div>



    <div class="w sk_container">
        <div class="sk_bd">
            <#list products as product>
            <ul>
                <li class="sk_goods">
                    <a href="/secKill/detail?productId=${product.seckillProduct.productId}"><img src="../upload/${product.product.photo}" width="287px" alt=""></a>
                    <h5 class="sk_goods_title">【限量秒杀】${product.product.name}</h5>
                    <p class="sk_goods_price"><em>￥${product.seckillProduct.price?c}</em> <del>￥${product.product.price?c}</del></p>

                    <#if product.seckillProduct.dateEnd?datetime lt .now?datetime>
                        <h5>&nbsp;&nbsp;本轮秒杀已结束...</h5>
                        <#else >
                            <#if product.seckillProduct.dateStart?datetime lt .now?datetime>
                                <h5>&nbsp;&nbsp;疯狂秒杀中...</h5>
                                <div class="sk_goods_progress">
                                    <#assign a=product.seckillProduct.numberStart-product.seckillProduct.number>
                                    <#assign b=product.seckillProduct.numberStart>
                                    已售<i>${a/b*100}%</i>
                                        <progress value="${product.seckillProduct.numberStart-product.seckillProduct.number}"
                                                  max="${product.seckillProduct.numberStart}">
                                        </progress>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                    剩余<em>${product.seckillProduct.number}</em>件
                                </div>

                            <#else >
                                <h5>&nbsp;&nbsp;&nbsp;${product.seckillProduct.dateStart}火爆抢购</h5>
                    </#if>
                   </#if>



                    <a href="/buy?productId=${product.seckillProduct.productId?c}&price=${product.seckillProduct.price?c}" class="sk_goods_buy">立即抢购</a>
                </li>
            </ul>
            </#list>



        </div>
        <div class="sk_page">
            <span class="page_num">
                <a href="#" class="pn-prev">&lt;&lt; 上一页</a>
                <a href="#">1</a>
                <a href="#" class="current">2</a>
                <a href="#">3</a>
                <a href="#">4</a>
                <a href="#">5</a>
                <a href="#" class="dotted">...</a>
                <a href="#" class="pn-next">下一页&gt;&gt;</a>
            </span>
            <span class="page_skip">
                共10页 到第
                <input type="text"> 页
                <button>确定</button>
            </span>
        </div>
    </div>


<bodyfooter>
    <div class="footer">
        <div class="alt">
            <div class="foot">
                <p>关于作者</p>
                <a href="###">冯东旺</a>
                <a href="###">外包171</a>
                <a href="###">广药</a>
                <a href="###">2021届</a>
                <a href="###">毕业设计</a>
                <a href="###">SpringCloud</a>
                <a href="###">电商平台</a>

            </div>
            <div class="foot">
                <p>资源</p>
                <a href="###">生产者代码</a>
                <a href="###">消费者代码</a>
                <a href="###">注册中心代码</a>
                <a href="###">控制代码</a>
            </div>
            <div class="foot">
                <p>产品介绍</p>
                <a href="###">使用教程</a>
                <a href="###">产品思路</a>
            </div>
            <div class="foot">
                <p>友情链接</p>
                <a href="###">Eureka注册中心</a>
                <a href="###">商家管理中心</a>
                <a href="###">资源占用查看</a>
            </div>
            <div class="foot">
                <p>反馈</p>
                <a >作者邮箱：fdw_fdw@qq.com</a>
            </div>
            <div class="foot">
                <p>服务支持</p>
                <a href="###">gitee下载链接</a>
            </div>
            <div class="foot">
                <p>打赏作者</p>
                <img src="../static/index/pay_photo/wechat.jpg" width="128px" height="150px"/>
            </div>
            <div class="foot">
                <p> </p>
                <img src="../static/index/pay_photo/alipay.jpg" width="128px" height="150px"/>
            </div>
        </div>
        <div style="border-top:1px #1F1F1F solid;">
            <p class="alt" style="color:#999; line-height:0;">@ 开放协议：GPL    
                <span>作者：</span>
                <a href="###" target="_blank" style="color:#999;">冯东旺</a>
                <span style="float:right;">地址：广州大学城广药</span>
            </p>
        </div>
    </div>
</bodyfooter>

<script>
    var Son = document.getElementById("Sun")
    Son.style.width = Percentage(${product.seckillProduct.number}, 100) + "%"
    function Percentage(current, total) {
        // 数量/总数量*100   公式
        return current / total * 100
    }
</script>

<script>
    var refer=true;
    var name;
    function combo(id,id_name) {
        name=id_name;
        if (refer) {
            var divdisp=document.getElementById("name"+id).style.visibility="visible";
            refer=false;
        }
        else {
            var divdisp=document.getElementById("name"+id).style.visibility=="hidden";
            refer=true;
        }
    }
</script>

</body>
</html>